package cn.foolishbird.hamal.frame.queryParam;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;
import java.util.Map;

/**
 * @author Eric
 * @version 1.0
 * @date 2020-03-11
 */
@Data
@Builder
@ApiModel("分页查询条件")
public class QueryCondition {

    /**
     * 当前页
     */
    @ApiModelProperty("页数")
    private int page = 1;

    /**
     *
     */
    @ApiModelProperty("一页量")
    private int size = 20;

    /**
     * 1 降序  2升序
     */
    @ApiModelProperty("是否降序")
    private SortEnum orderType = SortEnum.DESC;

    /**
     * 排序字段
     */
    @ApiModelProperty("排序字段")
    private String orderColumn;

    /**
     * 查询条件选项
     */
    @ApiModelProperty("查询条件选项")
    Map<String, QueryOption> options;


    @Tolerate
    public QueryCondition() {

    }
}
